﻿using UnityEngine;
using UnityEditor;
using System.Collections;

public class TilePostProcessingAsset : AssetPostprocessor {

	const string targetFolder = "Assets/Resources/Tiles/";
	public static int processPriority = 1;

	public override int GetPostprocessOrder()
	{
		return processPriority;
	}

	void OnPostprocessModel(GameObject go)
	{
		if (assetPath.StartsWith(targetFolder))
		{
			if (go.GetComponent<MeshCollider>() == null)
			{
				go.AddComponent<MeshCollider>();
			}

			var collider = go.GetComponent<MeshCollider>();
		
		}
	}
}
